this.trayBox.connect('allocation-changed',
Lang.bind(this, this._updateTrayBarrier));
- this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox' });
+ this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox',
+ reactive: true,
+ track_hover: true });
this.addChrome(this.keyboardBox, { visibleInFullscreen: true });
this._keyboardHeightNotifyId = 0;
}));
this._focusGrabber.connect('escape-pressed', Lang.bind(this, this._escapeTray));
+ Main.layoutManager.keyboardBox.connect('notify::hover', Lang.bind(this, this._onKeyboardHoverChanged));
+
this._trayState = State.HIDDEN;
this._locked = false;
this._traySummoned = false;
this._useLongerTrayLeftTimeout = false;
this._trayLeftTimeoutId = 0;
this._pointerInTray = false;
+ this._pointerInKeyboard = false;
this._summaryState = State.HIDDEN;
this._summaryTimeoutId = 0;
this._pointerInSummary = false;
}
},
+ _onKeyboardHoverChanged: function(keyboard) {
+ this._pointerInKeyboard = keyboard.hover;
+
+ if (!keyboard.hover) {
+ let event = Clutter.get_current_event();
+ if (event && event.type() == Clutter.EventType.LEAVE) {
+ let into = event.get_related();
+ if (into && this.actor.contains(into)) {
+ // Don't call _updateState, because pointerInTray is
+ // still false
+ return;
+ }
+ }
+ }
+
+ this._updateState();
+ },
+
_onStatusChanged: function(presence, status) {
this._backFromAway = (this._userStatus == GnomeSession.PresenceStatus.IDLE && this._userStatus != status);
this._userStatus = status;
let notificationsPending = this._notificationQueue.length > 0 && (!this._busy || notificationUrgent);
let notificationPinned = this._pointerInTray && !this._pointerInSummary && !this._notificationRemoved;
let notificationExpanded = this._notificationBin.y < 0;
- let notificationExpired = (this._notificationTimeoutId == 0 && !(this._notification && this._notification.urgency == Urgency.CRITICAL) && !this._pointerInTray && !this._locked) || this._notificationRemoved;
+ let notificationExpired = (this._notificationTimeoutId == 0 && !(this._notification && this._notification.urgency == Urgency.CRITICAL) && !this._pointerInTray && !this._locked && !(this._pointerInKeyboard && notificationExpanded)) || this._notificationRemoved;
let canShowNotification = notificationsPending && this._summaryState == State.HIDDEN;
if (this._notificationState == State.HIDDEN) {